home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softdisk Supreme
/
Softdisk Supreme.iso
/
pc
/
DSK Files
/
0-49
/
SD018b.dsk
/
APPLE II COPY.bas
< prev
next >
Wrap
BASIC Source File
|
2003-06-12
|
5KB
|
158 lines
0 TEXT : HOME
10 REM **
20 REM ** THIS ROUTINE POKES
30 REM ** THE RWTS SUBROUTINE
40 REM ** INTO MEMORY AT $300
50 REM
60 REM ** CALL 768 TO EXECUTE
70 REM ** AFTER POKING THE
80 REM ** FOLLOWING:
90 REM
100 REM LOC: $06 - TRACK #
110 REM LOC: $07 - SECTOR #
120 REM LOC: $08 - DRIVE #
130 REM LOC: $09 - SLOT # * 16
140 REM LOC: $0A - LO ADR BYTE
150 REM LOC: $0B - HI ADR BYTE
160 REM LOC: $551 - RD/WRT FLG
170 REM
180 REM
190 VTAB 5: HTAB 8: PRINT " APPLE ][ COPY PROGRAM"
200 VTAB 8: HTAB 8: PRINT "BY...JOEL M. MCWILLIAMS"
210 VTAB 11: HTAB 11: PRINT "COPYRIGHT (C) 1982"
220 VTAB 23: HTAB 1: INPUT " ";YN$
230 RESTORE
240 FOR LOC = 768 TO 829
250 READ CODE
260 POKE LOC,CODE
270 NEXT LOC
280 HOME
290 VTAB 1: HTAB 1: CALL -868: HTAB 12: PRINT "APPLE ][ COPY"
300 ONERR GOTO 340
310 VTAB 4: HTAB 10: CALL -868: PRINT "ORIGINAL SLOT: ";: GET S1: PRINT S1
320 POKE 216,0: REM ERRFLG OFF
330 GOTO 360
340 GOSUB 1380
350 GOTO 300
360 IF S1 <1 GOTO 300
370 IF S1 >7 GOTO 300
380 ONERR GOTO 420
390 VTAB 6: HTAB 10: CALL -868: PRINT "ORIGINAL DRIVE: ";: GET D1: PRINT D1
400 POKE 216,0: REM ERRFLG OFF
410 GOTO 440
420 GOSUB 1380
430 GOTO 380
440 IF D1 <1 GOTO 380
450 IF D1 >2 GOTO 380
460 ONERR GOTO 500
470 VTAB 8: HTAB 10: CALL -868: PRINT "DUPLICATE SLOT: ";: GET S2: PRINT S2
480 POKE 216,0: REM ERRFLG OFF
490 GOTO 520
500 GOSUB 1380
510 GOTO 460
520 IF S2 <1 GOTO 460
530 IF S2 >7 GOTO 460
540 ONERR GOTO 580
550 VTAB 10: HTAB 10: CALL -868: PRINT "DUPLICATE DRIVE: ";: GET D2: PRINT D2
560 POKE 216,0: REM ERRFLG OFF
570 GOTO 600
580 GOSUB 1380
590 GOTO 540
600 IF D2 <1 GOTO 540
610 IF D2 >2 GOTO 540
620 VTAB 22: HTAB 2: PRINT CHR$(91);"ESC"; CHR$(93);" TO RESTART - "; CHR$(91);"RETURN"; CHR$(93);" TO COPY ";: GET A$
630 IF ASC(A$) = 27 THEN 280
640 HOME
650 VTAB 22: HTAB 19: PRINT "PRESS "; CHR$(91);"ESC"; CHR$(93);" TO END"
660 FOR CT = 0 TO 28 STEP 7
670 ADDR = 24
680 POKE 227,1: REM RD FLAG
690 IF S1 < >S2 THEN 740
700 IF D1 < >D2 THEN 740
710 VTAB 2: HTAB 1: CALL -868
720 VTAB 2: HTAB 2: PRINT "INSERT 'ORIGINAL' DISKETTE ";: GET YN$
730 GOTO 760
740 IF CT >6 THEN 760
750 VTAB 2: HTAB 1: CALL -868: PRINT "INSERT 'ORIGINAL' IN SLOT: ";S1;: PRINT " DRIVE: ";D1: VTAB 4: HTAB 1: CALL -868: PRINT "INSERT 'DUPLICATE' IN SLOT: ";S2;: PRINT " DRIVE: ";D2: VTAB 22: HTAB 38: GET YN$
760 IF ASC(YN$) = 27 THEN HOME : END
770 FOR TRK = CT TO CT +6
780 POKE 6,TRK
790 POKE 8,D1: REM DRIVE 1
800 POKE 9,S1 *16: REM SLOT 1
810 FOR SECTR = 15 TO 0 STEP -1
820 VTAB 22: HTAB 19: PRINT "PRESS "; CHR$(91);"ESC"; CHR$(93);" TO END"
830 IF PEEK( -16384) = 155 THEN HOME : END
840 VTAB 10: HTAB 29: PRINT " "
850 VTAB 10: HTAB 3: PRINT "READING TRACK: ";TRK;" SECTOR: ";SECTR
860 POKE 7,SECTR
870 POKE 11,ADDR: REM HI
880 POKE 10,0: REM ADR LO
890 LET ADDR = ADDR +1
900 CALL 768
910 GOSUB 1450
920 NEXT SECTR
930 NEXT TRK
940 IF S1 < >S2 THEN 990
950 IF D1 < >D2 THEN 990
960 VTAB 2: HTAB 1: CALL -868
970 VTAB 2: HTAB 2: PRINT "INSERT 'DUPLICATE' DISKETTE ";: GET YN$
980 IF ASC(YN$) = 27 THEN HOME : END
990 LET ADDR = 24
1000 IF CT < >0 GOTO 1060
1010 POKE 8,D2: REM DRIVE 2
1015 POKE 9,S2 *16: REM SLOT 2
1020 POKE 227,4: REM INIT DISK
1030 VTAB 10: HTAB 1: CALL -868: HTAB 9: INVERSE : PRINT " ": VTAB 11: HTAB 9: PRINT " FORMATTING DISKETTE ": VTAB 12: HTAB 9: PRINT " ": NORMAL
1040 CALL 768
1050 VTAB 10: HTAB 1: CALL -868: VTAB 11: CALL -868: VTAB 12: CALL -868
1060 POKE 227,2: REM WRT FLAG
1070 FOR TRK = CT TO CT +6
1080 POKE 6,TRK
1090 POKE 8,D2: REM DRIVE 2
1100 POKE 9,S2 *16: REM SLOT 2
1110 FOR SECTR = 15 TO 0 STEP -1
1120 VTAB 22: HTAB 19: PRINT "PRESS "; CHR$(91);"ESC"; CHR$(93);" TO END"
1130 IF PEEK( -16384) = 155 THEN HOME : END
1140 VTAB 10: HTAB 29: PRINT " "
1150 VTAB 10: HTAB 3: PRINT "WRITING TRACK: ";TRK;" SECTOR: ";SECTR
1160 POKE 7,SECTR
1170 POKE 11,ADDR: REM HI
1180 POKE 10,0: REM LO ADR
1190 LET ADDR = ADDR +1
1200 CALL 768
1210 GOSUB 1450
1220 NEXT SECTR
1230 NEXT TRK
1240 NEXT CT
1250 HOME : VTAB 5: PRINT "COPY ANOTHER DISKETTE? ";: GET YN$
1260 IF YN$ = "Y" THEN RUN
1270 POKE 1012,69
1280 HOME
1290 END
1300 DATA 24,169,0,141,245,183,133,12
1310 DATA 141,235,183,165,9,141,233,183
1320 DATA 165,8,141,234,183,165,6,141,236,183
1330 DATA 165,7,141,237,183,165,227,141
1340 DATA 244,183,165,10,141,240,183,165,11
1350 DATA 141,241,183,169,183,160,232,32
1360 DATA 217,3,144,5,173,245,183,133,12,96,0
1370 REM ** ERROR SUB
1380 REM
1390 LET ERR = PEEK(222)
1400 POKE 216,0: POKE 222,1
1410 IF ERR = 254 THEN RETURN
1420 IF ERR = 16 THEN RETURN
1430 HOME : PRINT "ERROR": END
1440 RETURN
1450 REM
1460 REM DOS ERROR
1470 IF PEEK(227) = 1 THEN 1490
1480 IF PEEK(47093) = 16 THEN HOME : PRINT "DISKETTE WRITE PROTECTED<CTRL-G> ";: GET YN$: GOTO 230
1490 RETURN
65529 REM
65530 REM $$$$$$$$$$$$$$$$$$$$$
65531 REM $ APPLE ][ COPY $
65532 REM $ COPYRIGHT (C) 1982$
65533 REM $ ... BY ... $
65534 REM $ JOEL M MCWILLIAMS $
65535 REM $$$$$$$$$$$$$$$$$$$$$